<?xml version="1.0" encoding="utf-8"?>
 <grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:ann="http://dyomedea.com/examples/ns/annotations" ann:attribute="Annotation as foreign attribute for 'grammar'">
   <ann:element>Initial annotation as foreign element for &quot;grammar&quot;</ann:element>
   <start ann:attribute="Annotation as a foreign attribute for 'start'">
     <ann:element>Initial annotation as foreign element for &quot;start&quot;</ann:element>
     <element name="library" ann:attribute="Annotation as a foreign attribute for 'element'">
       <ann:element>Initial annotation as foreign element for &quot;element&quot;</ann:element>
       <oneOrMore ann:attribute="Annotation as a foreign attribute for 'oneOrMore'">
         <ann:element>Initial annotation as foreign element for &quot;oneOrMore&quot;</ann:element>
         <ref name="book-element" ann:attribute="Annotation as a foreign attribute for 'ref'">
           <ann:element>Initial annotation as foreign element for &quot;ref&quot;</ann:element>
         </ref>
         <ann:element>Following annotation as foreign element for &quot;oneOrMore&quot;</ann:element>
       </oneOrMore>
       <ann:element>Following annotation as foreign element for &quot;element&quot;</ann:element>
     </element>
     <ann:element>Following annotation as foreign element for &quot;start&quot;</ann:element>
   </start>
   <ann:element>Grammar annotation as foreign element for &quot;grammar&quot;</ann:element>
   <define name="author-element">
     <element name="author">
       <attribute name="id"/>
       <ref name="name-element"/>
       <ref name="born-element"/>
       <optional>
         <ref name="dead-element"/>
       </optional>
     </element>
   </define>
   <define name="book-start">
     <attribute name="id"/>
     <ref name="isbn-element"/>
     <ref name="title-element"/>
     <zeroOrMore>
       <ref name="author-element"/>
     </zeroOrMore>
   </define>
   <define name="book-end">
     <zeroOrMore>
       <ref name="author-element"/>
     </zeroOrMore>
     <zeroOrMore>
       <ref name="character-element"/>
     </zeroOrMore>
     <attribute name="available"/>
   </define>
   <define name="book-element">
     <element name="book">
       <ref name="book-start"/>
       <ref name="book-end"/>
     </element>
   </define>
   <define name="born-element">
     <element name="born">
       <text/>
     </element>
   </define>
   <define name="character-element">
     <element name="character">
       <attribute name="id"/>
       <ref name="name-element"/>
       <ref name="born-element"/>
       <ref name="qualification-element"/>
     </element>
   </define>
   <define name="dead-element">
     <element name="dead">
       <text/>
     </element>
   </define>
   <define name="isbn-element">
     <element name="isbn">
       <text/>
     </element>
   </define>
   <define name="name-element">
     <element name="name">
       <text/>
     </element>
   </define>
   <define name="qualification-element">
     <element name="qualification">
       <text/>
     </element>
   </define>
   <define name="title-element">
     <element name="title">
       <attribute name="xml:lang"/>
       <text/>
     </element>
   </define>
 </grammar>
